package com.acsior.hibernate.vo;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.ddfn.impl.hibernate.vo.NomElementVO;

/**
 * NomServiceGroup entity. @author MyEclipse Persistence Tools <b><i>powered by
 * Belev</i></b>
 */
@Entity
@Table(name = "nom_service_groups", uniqueConstraints = @UniqueConstraint(columnNames = "system_name"))
@GeneratorKey(tableName = "nom_service_groups")
public class NomServiceGroupVO extends NomElementVO {

	private static final long serialVersionUID = -4786229630417047591L;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "nomServiceGroup")
	private List<NomServiceSubgroupVO> nomServiceSubgroups;

	/** default constructor */
	public NomServiceGroupVO() {
		this.nomServiceSubgroups = new ArrayList<NomServiceSubgroupVO>();
	}

	/** @return the nomServiceSubgroups */
	public List<NomServiceSubgroupVO> getNomServiceSubgroups() {
		return this.nomServiceSubgroups;
	}

	/**
	 * @param nomServiceSubgroups
	 *            the nomServiceSubgroups to set
	 */
	public void setNomServiceSubgroups(List<NomServiceSubgroupVO> nomServiceSubgroups) {
		this.nomServiceSubgroups = nomServiceSubgroups;
	}

}